package com.xbongbong.workflow.pojo;

import com.xbongbong.paas.field.FormulaPoJo;
import com.xbongbong.paas.pojo.OperationsPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author 吴峰
 * @date 2021/05/28 17:01
 */
@Getter
@Setter
@ToString
public class WorkflowOperationsPojo extends OperationsPojo {
    private static final long serialVersionUID = -6020683310004924243L;

    /**
     * 选择更新的字段所在的节点id
     */
    private Long workflowNodeId;
    /**
     * 选择更新的字段所在的节点id对应的表单id
     */
    private Long formId;
    /**
     * 选择更新的字段所在的节点id对应的表单业务类型
     */
    private Integer businessType;
    /**
     * 选择更新的字段所在的节点id对应的表单saas标识
     */
    private Integer saasMark;

    /**
     * 是否是触发节点字段的标识，0:不是；1:是
     */
    private Integer triggerNodeFlag;

    public WorkflowOperationsPojo(Long workflowNodeId, Long formId, Integer businessType, Integer saasMark, Integer triggerNodeFlag,
                                  @NotEmpty(message = "目标表单字段不能为空") String attr, String attrName, @NotNull(message = "字段类型不能为空") Integer fieldType,
                                  @NotEmpty(message = "操作标示不能为空") String symbol,
                                  @NotNull(message = "值类型不能为空") Integer valueType, Object value, String valueAttr, Integer valueFieldType, String valueAttrName, FormulaPoJo formulaInfo) {
        super(attr, attrName, fieldType, symbol, valueType, value, valueAttr, valueFieldType, valueAttrName, formulaInfo);
        this.workflowNodeId = workflowNodeId;
        this.formId = formId;
        this.businessType = businessType;
        this.saasMark = saasMark;
        this.triggerNodeFlag = triggerNodeFlag;
    }
}
